perm filename DBUG.SAI[11,ARG] blob sn#571687 filedate 1981-03-13 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	BEGIN "disk test procedure"
C00004 ENDMK
C⊗;
BEGIN "disk test procedure"

DEFINE	CRLF="('15&'12)",
	! = "COMMENT ",
	TIL="STEP 1 UNTIL",
	RKDS ='777400,
	RKCS ='777404,
	RKDA ='777412;

REQUIRE "11UTIL.HDR[11,SYS]" SOURCE_FILE;

INTEGER i,j,k,bad;

alinit(FALSE);

poke(rkcs,1);	! do a control reset;
poke(rkda,0);	! select drive 0;

i ← 0;
j ← peek(RKDS) LAND '17;
do begin
   k ← peek(RKDS) LAND '17;
   i ← i + 1;
   end until i > 20 or j ≠ k;
if j = k then print("removable drive is bad"&crlf)
 else print("removable drive is ok"&crlf);

poke(rkcs,1);	! do a control reset;
poke(rkda,'40000);	! select drive 2;

i ← 0;
j ← peek(RKDS) LAND '17;
do begin
   k ← peek(RKDS) LAND '17;
   i ← i + 1;
   end until i > 20 or j ≠ k;
if j = k then print("fixed drive is bad"&crlf)
 else print("fixed drive is ok"&crlf);

while true do
 begin
 for i ← 0 til 300 do
  begin
  k ← peek(RKDS) LAND '17;
  print(cvos(k));
  if j ≠ k then begin print("		***",crlf); j ← k; end else print(crlf);
  CALL(0,"SLEEP");	! Sleep for 1 tick;
  end;
 print("cr to continue"); inchwl;
 end;

END;